@echo off

cd ..

pyinstaller -F TileBuilder.py
pyinstaller -F PreProcessor.py
pyinstaller -F DataKeeper.py
pyinstaller -F DeuGlobeExplorer.py

mkdir dist\inputdata
mkdir dist\readme
mkdir dist\outputdata\OutPic
mkdir dist\outputdata\DataSet

copy /y inputdata\*.* dist\inputdata\
copy /y readme\*.* dist\readme\

del /s /f *.spec


set winrar="C:\Program Files\WinRAR"
set distpath="dist\"
cd %distpath%

%winrar%\WinRAR.exe a GUIDeuGlobeAutoTest_X32_%date:~0,4%%date:~5,2%%date:~8,2%.zip -s -r *

copy /y GUIDeuGlobeAutoTest_X32_%date:~0,4%%date:~5,2%%date:~8,2%.zip ..\SetupFactory\

cd ..
rd /s /q build,dist,__pycache__,extendScript\__pycache__